package com.sh169.util;

import org.nutz.aop.InterceptorChain;
import org.nutz.aop.interceptor.AbstractMethodInterceptor;
import org.nutz.lang.Stopwatch;
import org.nutz.log.Log;
import org.nutz.log.Logs;

public class LoggingInterceptor extends AbstractMethodInterceptor{
	private static Log log = Logs.getLog(LoggingInterceptor.class);
	@Override
	public void filter(InterceptorChain chain) throws Throwable {
		Stopwatch sw = Stopwatch.begin();
		super.filter(chain);
		sw.stop();
		log.error(sw.toString());
	}
}
